package com.alog.senior.jdbc;

import org.springframework.jdbc.core.JdbcTemplate;

/**
 * @Auther: Ye Zhengdong
 * @Date: 2019/1/30 14:35
 * @Description:
 */
public class JdbcTemplateDemo {
    public static void main(String[] args) {
        JdbcTemplate template = new JdbcTemplate(DruidUtil.getDataSource());


        testUpdate(template);
    }

    private static void testUpdate(JdbcTemplate template) {
        String sql = "UPDATE account SET money = ? WHERE name = ?";
        template.update(sql, new Object[]{2500, "ccc"});
    }
}
